import java.util.Scanner;
public class Test3 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        while (sc.hasNext()){
            String s=sc.nextLine();
            int len=s.substring(s.lastIndexOf(' ')+1,s.length()).length();
            System.out.println(len);
        }
        sc.close();
    }
}
